#! /bin/sh

echo "#ifndef ASM_WRAPPER_H_" > asm_wrapper.h
echo "# define ASM_WRAPPER_H_" >> asm_wrapper.h
echo "" >> asm_wrapper.h

for i in {0..255} ; do
    echo "void asm_wrapper_$i(void);" >> asm_wrapper.h
done

echo "" >> asm_wrapper.h

echo "typedef void (*interrupt_handler)(void);" >> asm_wrapper.h

echo "static const interrupt_handler asm_wrapper[] = {" >> asm_wrapper.h

for i in {0..255} ; do
    echo "asm_wrapper_$i," >> asm_wrapper.h
done

echo "};" >> asm_wrapper.h
echo "" >> asm_wrapper.h

echo "" >> asm_wrapper.h
echo "#endif /* !ASM_WRAPPER_H_ */" >> asm_wrapper.h